package me.zfz.business.bean;

import org.apache.commons.lang3.StringUtils;

import me.zfz.base.filter.bean.FilterParam;

/**
 * 版本搜索对象
 *
 * @author author
 */
public class VersionSearch extends FilterParam {

    private String version;

    private String versionType;

    @Override
    public String getParamToString() {
        StringBuilder strBuilder = new StringBuilder();
        String param = super.getParamToString();
        if (StringUtils.isNotEmpty(param)) {
            strBuilder.append(param);
        }
        if (null != version) {
            strBuilder.append("&version=" + version.toString());
        }
        if (StringUtils.isNotEmpty(versionType)) {
            strBuilder.append("&versionType=" + versionType);
        }
        param = strBuilder.toString();
        if (StringUtils.isNotEmpty(param) && param.startsWith("&")) {
            param = param.substring(1);
        }
        return param;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getVersionType() {
        return versionType;
    }

    public void setVersionType(String versionType) {
        this.versionType = versionType;
    }


}
